package com.fortune.dto.in.cOrderMgt;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

import com.fortune.common.paging.PagingDto;
import com.fortune.constants.enums.AccountInfoEnum;
import com.fortune.constants.enums.Approve;
import com.fortune.constants.enums.Delivery;
import io.swagger.annotations.ApiModelProperty;

/**
 * TODO 
 * @author ran
 *
 */
public class COrderListDto extends PagingDto{
	@NotNull(message="approve必须为YES,NO,ALL三者之一")
	private Approve approve;
	@NotNull(message="delivery必须为YES,NO,ALL三者之一")
	private Delivery delivery;
	@NotNull(message="account必须为YES,NO,ALL三者之一")
	private AccountInfoEnum account;
	private String driverId;
	private String search;
	@ApiModelProperty(example="排序依据(起始日期:startTime,截止日期:endTime,满数量:achieveNum,赠数量:giftNum,优惠名称:name,商品名称:productName,商品编号:producNumber,默认为startTime)",allowableValues = "startTime,endTime,achieveNum,giftNum,name,productName,producNumber")
	private String order;
	@Min(value = 0,message = "最小值为0")
	@Max(value = 1,message = "最大值为1")
	@ApiModelProperty(example="排序类型(0升序,1降序,默认为1)")
	private Integer type;

	public String getOrder() {
		return order;
	}

	public void setOrder(String order) {
		this.order = order;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Approve getApprove() {
		return approve;
	}

	public void setApprove(Approve approve) {
		this.approve = approve;
	}

	public Delivery getDelivery() {
		return delivery;
	}

	public void setDelivery(Delivery delivery) {
		this.delivery = delivery;
	}

	public AccountInfoEnum getAccount() {
		return account;
	}

	public void setAccount(AccountInfoEnum account) {
		this.account = account;
	}

	public String getDriverId() {
		return driverId;
	}

	public void setDriverId(String driverId) {
		this.driverId = driverId;
	}

	public String getSearch() {
		return search;
	}

	public void setSearch(String search) {
		this.search = search;
	}

	@Override
	public String toString() {
		return "COrderListDto{" +
				"approve=" + approve +
				", delivery=" + delivery +
				", account=" + account +
				", driverId='" + driverId + '\'' +
				", search='" + search + '\'' +
				'}';
	}
}
